home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-14 | 18.4 KB | 431 lines | [TEXT/KAHL] |
- 12 August 1993
- Font: 9 point Monaco
-
-
- Using SourceServer from the Think Project Manager
- _________________________________________________
-
- This document describes:
-
- - Changes made to the Think Project Manager's interface with SourceServer
- - Commands for SourceServer's command-line interface
- - Hints and techniques for working with SourceServer
-
- This document supplements Chapter 25,"Using SourceServer", in the Think C/ Symantec C++
- User's Guide. Where text differs, or is contradictory between the two, you should assume
- that the information in this document is the correct version.
-
- In the discussion below, SourceServer databases, SourceServer projects, and
- projector databases are treated interchangeably. Also, TPM is the acronym for
- "Think Project Manager."
-
-
- Tips, Techniques, and Changes to the Interface
- _____________________________________________
-
- Nested Projects (subdatabases):
-
- The single most important thing to insure acceptable performance (in terms of
- response time) is to make use of nested projector databases. Projector
- databases can keep track of 200 files in a single database, but if you put this many
- files in one database, you will find yourself waiting several minutes before the CheckOut
- dialog appears. Other operations will be similarly frustrating because of the amount of
- time they take to complete. Using fewer files per database becomes even more
- important if the database file is kept on a server, since access to a remote host
- will also reduce performance.
-
- When you use nested projects, each database can contain a smaller subset of
- source files, and response time can be kept to respectable levels. How you group files
- is up to you; you might do it according to a functional relationship between
- files. If you were putting the Think Class Library under source control, for
- example, you might have separate databases for the dialog classes, text classes,
- table classes, etc.
-
- Creating nested projector databases is straightforward. When you create a new
- projector database with SourceServer, a folder is created with a projectorDB file
- inside of it. The folder's name is what you use to refer to the database (in the
- mount project dialog, for example). By nesting the folders created for each
- database, SourceServer will treat them as one nested project.
-
- Using our TCL example again, the folder layout might look like this:
-
- My SourcesDB
- _________________________|____________________________
- | | | |
- Table classesDB Text classesDB More classesDB Core SourcesDB
- |
- Core HeadersDB
-
- This chart doesn't represent the entire TCL, but it shows the idea of using nested
- projects. Setting up nested databases is time consuming, but is well worth the
- effort. Response time will be significantly better than with a single project
- containing every source file and header file.
-
-
- Removing a File from Source Control:
-
- Once a file is added to a SourceServer database, a 'CKID' resource is added to
- the file to store relevant project information. The 'CKID' resource will also
- prevent the file from being checked into a different database. If you want to remove any
- association a file has with SourceServer, you can use the OrphanFile command (see
- the command line description below).
-
- Note that once you orphan a file, there is no way to check the file back into its
- former project because it no longer belongs to that project. You can, however,
- use the TransferCkid commmand to remedy this by transfering a 'ckid' resource with the
- correct project information to this file.
-
-
- Named Revisions:
-
- It's not uncommon for a programmer to always work on the same subset of files in a
- large project, or to work on a given set of files for an extended period of time.
- The "Name Revisions..." dialog provides an easy way for each person to define working
- sets of source files. Setting up a Named Revision with 'Dynamic Revision' will let you
- always choose the most current file in a revision tree. Once a revision has been named,
- you canselect it in the CheckOut dialog, rather than specifying each file you want
- individually.
-
- Named Revisions can also be set with the 'Static Revision' option. Revisions
- named this way will refer to the versions of each file that are current at the time the
- revision is named. A typical use for this is to have a named set for a frozen
- version of code, such as beta or final releases.
-
-
- Why Newer is better:
-
- The "Newer" button in the CheckOut dialog has been modified from its original
- implementation. Here's how it works now:
-
- When you click on the Newer button, the Project Manager will look at files in the
- "Checkout to:" directory. Files will be highlighted if their newest (non-branch)
- revision is NOT already in that directory. Files will not be highlighted if you
- have a branch checked out, since you would normally intend to keep a branch if
- you've already checked it out.
-
- If you option-click the Newer button, files will be selected that do exist in
- the "Checkout to:" directory, if they are older than the current revision AND are
- checked out as read only. This is the same as using -update from the command
- line. The effect is that all Read Only files in the directory are overwritten
- with the latest version of the file.
-
- If the "CheckOut to:" directory is set to "Default Directories", then the Newer
- button works in way similar to the descriptions above, except that the actions
- are on a (TPM) project- wide basis. That is, clicking on the Newer button selects
- all files in your project that are not already somewhere in your TPM project's tree
- or the system tree. Likewise, option clicking will select all
- read-only files from the project that are on disk already. Files which cannot be
- found, or are not part of the TPM project, are not selected.
-
- When using the "Default Directories" as the Checkout directory, files will be
- checked out to the location in which they were last found. Any local copies of
- files may be moved around freely in the project or system tree, and the file will
- be checked out properly. If a file isn't in the same tree as where it was last
- found, CheckOut will put the file in your project's top level directory. When this
- is done, SourceServer will give the message "Some files were checked out to the
- directory <project directory>".
-
- Having files checked out to the root level will normally only occur with header
- files that you don't have local copies of. The TPM stores information about the
- location of files that are in the project (such as .c or .r files), but not of
- #included headers.
-
-
- SourceServer Timeouts:
-
- The first release of the Think Project Manager would sometimes give a timeout
- error for SourceServer operations that took too long. One example was choosing
- the CheckOut... dialog for a remotely mounted project with a large number of
- files.
-
- The TPM will no longer time out SourceServer operations. You can cancel any
- command by pressing <command>-<period>. Note, however, that SourceServer will
- still need to finish a command in progress before a new command can be sent from
- the TPM.
-
-
- CheckIn Changes:
-
- There has been a modification to the user interface of the file list in the
- CheckIn dialog. Double clicking on a file now does nothing (it used to Check In
- the file). This is to prevent checking a file in accidentally when you are just
- trying to browse a list of revisions.
-
-
- CheckOut Changes:
-
- The default for file checkout has been changed from modify read-only to
- read-only.
-
-
- Using the Command Line Interface
- ________________________________
-
- The Think Project Manager allows you to use the SourceServer Command Line
- interface. The commands and options are the same as MPW projector commands,
- with the following exceptions:
-
- - The commands MergeBranch and CompareRevisions are not available
- - Commands that have -w and -close options in MPW do not have corresponding
- options in SourceServer.
-
- To use the command line interface, enter a SourceServer command and all options,
- and press <ctrl> <enter> to send the line to SourceServer. Command lines can be sent
- this way from any window the Think Project Manager editor has open that is modifiable.
- Usually you will want to have a new untitled window available for sending commands.
-
- Things to note about the command line options:
-
- - When you need to specify a filename, use the Full Pathname
- - When using DeleteRevisions, be sure to specify the -y option
- - There is no help available, except for the usage summary, or through ToolServer
- - SourceServer commands are NOT case sensitive. Neither are file and
- folder names
- - When entering pathnames, if any file or folder has a space in the name,
- the whole path name should be surrounded by double quotes
- - A file on the Desktop can be specified as "HD Name:Desktop Folder:filename"
-
-
- SourceServer Command Descriptions:
-
- For all command descriptions and syntax listings, square brackets ( [] ) denote
- optional parameters. Parameters separated by the vertical bar ( | ) show mutually
- exclusive parameters.
-
-
- CheckIn: Checks a file or files into a projector database
-
- Usage: CheckIn [-p] [-u User] [-project Project] [-t task] [-new | -b]
- [-cs comment | -cf file] [-m | -delete] [-touch] [-verify]
- [-y|-n|-c] (-a | file…)
-
- Option summary:
- -a Checkin all files in the current directory
- -b Check in file… as branches
- -c Cancel if conflict occurs (avoids dialog)
- -cf file Look for comments in the file
- -cs comment Adds a description of changes made to the file
- -delete Delete the file after checking it in
- -m Checkout the files for modification after checking in
- -n Answer no to all dialogs (avoids dialogs)
- -new Add a new file to the project
- -p Write progress information to standard output
- -project project Gives the name of project that contains the files
- -t task Adds a short description of task accomplished
- -touch Touch the mod date of file after checking in
- -u user Gives the name of the current user
- -verify Verify the contents of the checked in file
- -y Answer yes to all dialogs (avoids dialogs)
-
-
-
- CheckOut: Checkout a file or files from a projector database
-
- Usage: CheckOut [-p] [-m] [-b] [-cancel] [-u User] [-project Project] [-t task]
- [-d dir] [-cs comment | -cf file] [-r] [-open] [-y|-n|-c] [-noTouch|-touchOnly]
- [-history] [-verify] [-obsolete] (-update | -newer | -a | name*)
-
- Option Summary:
- -a Checkout all the files in the current project
- -b Checkout specified files on a new branch
- -c Cancel if conflict occurs (avoids dialog)
- -cancel Cancel the checkout of the files
- -cf file Looks for the comment in the file
- -cs comment Add a short description of changes
- -d dir Names the Directory where the checked out files
- should go
- -m Checkout a modifiable copy of the file
- -n Answer no to all dialogs (avoids dialogs)
- -newer Checkout latest copy of all files in the project
- -noTouch Don't touch the mod date of the checked out files
- -open Open the files after checking out
- -p Write progress information to standard output
- -project project Name of project that contains the files
- -r Recursively checkout files
- -t task Add a short description of task accomplished
- -u user Gives the name of current user
- -update Checkout latest copy of all files you already have
- -verify Verify the contents of the checked out file
- -y Answer yes to all dialogs (avoids dialogs)
-
- *name = file name | NameRevisions name
-
-
-
- CheckOutDir: Specify the directory where checked out files will be placed
-
- Usage: CheckOutDir [-project Project | -m] [-r] [-x | directory]
-
- Option Summary:
- -project project Name the project to associate with the checkout directory
- -m List the checkout directories of all root projects
- -r Recursively set or display the checkout directories
- -x Reset the checkout directories to ":"
-
-
-
- CompareRevisions: Is not available with SourceServer
-
-
-
- DeleteNames: Delete user-defined symbolic names
-
- Usage: DeleteNames [-u User] [-project Project] [-public | -private] [-r] [names… | -a]
-
- Option Summary:
- -u user Name of current user
- -private Delete private names
- -project project Name of project that contains the files
- -public Delete public names (the default)
- -r Delete names recursively
- -a Delete all names
-
-
-
- DeleteRevisions: Delete previous revisions of files in a project
-
- Usage: DeleteRevisions [-u User] [-project Project] [-file] -y file…
-
- Option Summary:
- -u user Name the current user
- -project project Name the project that contains the files
- -file Delete the file and all its revisions
- -y Delete the file/revision. ALWAYS USE THIS OPTION
- OR SOURCESERVER WILL PUT UP A DIALOG BOX THAT
- YOU CANNOT RESPOND TO.
-
-
-
- MergeBranch MergeBranch is not available with SourceServer
-
-
-
- ModifyReadOnly: Enables read-only Projector files to be edited
-
- Usage: ModifyReadOnly file
-
-
-
- MountProject Mount projects
-
- Usage: MountProject ([-s] [-pp] [-q] [-r]) | [Project [-only] ]
-
- Option Summary:
- -s Print names only, not commands
- -pp List mounted projects using project paths
- -q Don't quote names with special characters
- -r List projects recursively
-
-
-
- NameRevisions Define a symbolic name
-
- Usage: NameRevisions [-u User] [-project Project] [-public | -private | -b] [-r]
- [[-only] | name [[-expand] [-s] | [-replace] [-dynamic] [names… | -a]]]
-
- Option Summary:
- -u user Name the current user
- -private Create a private name
- -project project Name the project that contains the revisions
- -public Create a public name (the default)
- -b Print both public and private names
- -expand Evaluate names to revision level before printing
- -only Only print the names, not the associated revisions
- -replace Completely overwrite the previous definition of name
- -dynamic Evaluate names to revision level when using not defining
- -r Recursively execute NameRevisions starting with current
- project
- -s Print a single name per line
- -a All the files in the project
-
-
-
- NewProject Create a new project
-
- Usage: NewProject [-u User] [-cs comment | -cf file] project
-
- Option Summary:
- -cf file Look for the comments in file
- -cs comment Add a short description of the project
- -u user Name the current user
-
-
-
- OrphanFiles Remove Projector info ('ckid' resource) from a list of files
-
- Usage: OrphanFiles file…
-
-
-
- Project Set or write the current project
-
- Usage: Project -q | [project]
-
- Option Summary:
- -q Don't quote projects with special characters
-
-
-
- ProjectInfo Display information about a Project
-
- Usage: ProjectInfo [-project Project] [-log] [-comments] [-latest] [-f] [-r] [-s]
- [-only | -m] [-af author | -a author] [-df dates | -d dates]
- [-cf pattern | -c pattern] [-t pattern] [-n name] [-update | -newer] [file…]
-
- Option Summary:
- -a author Only list revisions created by author
- -af author Only list files created by author
- -c pattern Only list revisions whose comment contains pattern
- -cf pattern Only list files whose comment contains pattern
- -comments List comments along with the rest of the information
- -d dates Only list revisions whose create date is within dates
- -df dates Only list files whose mod date is within dates
- -f List file information
- -log Print project log
- -m Only list files/revisions that are checked out
- -newer Gives info on files that would be checked out using
- this option
- -only Only list project information
- -project project Name the project to get information on
- -r Recursively list subprojects
- -latest Only list info on the latest revision on the main trunk
- -s Use short listing, names and revision names only
- -t pattern Only list revisions whose task contains pattern
- -n name Only list revisions that have name
- -update Give info on files that would be checked out using
- this option
-
- Note: pattern is either a literal string or /regular expression/.
-
- Note: "dates" may take the following forms:
- date On date
- <date Before but not including date
- ≤date Before and including date
- >date After and not including date
- ≥date After and including date
- date-date Between and including dates
-
- Note: A date is mm/dd/yy [[hh:mm[:ss]] [AM|PM]]
-
- Note: "name" may take the following forms:
- name In name
- <name Before name
- ≤name Before and including name
- >name After name
- ≥name After and including name
-
-
-
- TransferCkid: Move Projector information from one file to another
-
- Usage: TransferCkid fromFile toFile
-
-
-
- UnmountProject Unmount projects
-
- Usage: UnmountProject [-a | Project…]
-
- Option Summary
- -a Unmount all mounted projects
-